package com.wyq.dao;

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.wyq.bean.Audience;

public interface AudienceDao {
	@Transactional
	public void saveAudience(Audience audience);
	
	public void removeAudience(Audience audience);
	
	public Audience findAudienceById(int id);
	
	public List<Audience> findPageAudiences(String start,String limit,String type) throws Exception;
	public List<Audience> findAllAudiences(String type) throws Exception;
	
	//得到数据库中用户最大的ID
	public List getAudienceMaxID() throws Exception;
	
	public void updateAudience(Audience audience);
	
	public boolean existAudience(Map<String,String> options);
	
	//查找手机号或邮箱是否注册
	public List findAudienceIsRegister(String name,String value,String type) throws Exception;
	
	public List getAudienceRegisterInfo(Audience audience);
	//得到用户的调查问卷信息
	public List getAudienceQInfo(String audienceId) throws Exception;
	
	public void update();
}
